
#+macintosh (setf menu-bar-height 38)
#+macintosh (setf window-decoration-width 18) 
#+macintosh (setf window-decoration-height 18) 
#+macintosh (setf size-width-fiddle 0)
#+macintosh (setf size-height-fiddle 0)
#-msdos     (setf msdos-fiddle 0)
#-msdos     (setf border-thickness 0)

#+msdos(setf menu-bar-height 0)
#+msdos(setf window-decoration-width 8) ;8
#+msdos(setf window-decoration-height 8);8
#+msdos(setf border-thickness 3) ;4
#+msdos(setf size-width-fiddle 0)
#+msdos(setf size-height-fiddle 0);0
#+msdos(setf msdos-fiddle 15)


#+X11 (setf menu-bar-height 0)
#+X11 (setf window-decoration-width 0)
#+X11 (setf window-decoration-height 0)
#+X11 (setf size-width-fiddle 22)
#+X11 (setf size-height-fiddle 70)

(setf *max-screen-size* (* 2 (floor (/ (screen-size) 2)))) 
#+msdos (setf *max-screen-size* (list (select *max-screen-size* 0) 
                                (- (select *max-screen-size* 1) 54)));58 56 54
#+win32 (if (not *full-screen*)
            (setf *max-screen-size* (list (select *max-screen-size* 0) 
                                    (- (select *max-screen-size* 1) 40))));50

;(setf screen-size (list 640 398)) ;for 640 480 win95 screen test
;(setf screen-size (list 640 480)) ;for 640 480 mac screen test
;(setf screen-size (list 725 480))
;(setf screen-size (list 725 500))

(setf screen-size *max-screen-size*)


(defun spreadplot-sizes (size)
  (setf screen-size size)
  (setf row-pixels (select screen-size 1)) 
  (setf graph-size (floor (/ (- row-pixels menu-bar-height) 2))) 
  (setf med-graph-width (floor (/ (first screen-size) 2))) 
  (setf med-graph-height graph-size)
  (setf wide-graph-width (first screen-size)) 
  (setf wide-graph-height graph-size)
  (setf location11 (list 1 menu-bar-height)) 
  (setf location12
        (list (+ graph-size window-decoration-width) menu-bar-height)) 
  (setf location13
        (list (* 2 (+ graph-size window-decoration-width)) menu-bar-height)) 
  (setf location21
        (list 1 (+ graph-size menu-bar-height 
                   border-thickness window-decoration-height))) 
  (setf location22
        (list (+ graph-size window-decoration-width) 
              (+ graph-size menu-bar-height
                 border-thickness window-decoration-height))) 
  (setf location23
        (list (* 2 (+ graph-size window-decoration-width)) 
              (+ graph-size menu-bar-height 
                  border-thickness window-decoration-height))) 
  (setf graph-size
        (list (- graph-size size-width-fiddle)
              (- graph-size size-height-fiddle border-thickness)))
  (setf med-graph-size
        (list (- med-graph-width size-width-fiddle) 
              (- med-graph-height size-height-fiddle))) 
  (setf wide-graph-size
        (list (- wide-graph-width size-width-fiddle) 
              (- wide-graph-height size-height-fiddle))) 

  (setf full-graph-size
        (list (- wide-graph-width size-width-fiddle 9) 
              (- (* 2 wide-graph-height) size-height-fiddle 10))) 

#+macintosh(setf full-graph-size (+ full-graph-size (list (- 9) 28))) 

  (setf namelist-size 
        (list (- (select screen-size 0) (select location23 0) 8 
                 (- msdos-fiddle)) 
              (select graph-size 1)))
  (setf long-namelist-length 
        (* 2 (+ 10 (- (select namelist-size 1) msdos-fiddle))))
#+msdos (setf long-namelist-length (+ long-namelist-length 3))
#+macintosh (setf long-namelist-length (- long-namelist-length 2))
  (setf (select graph-size 1) (- (select graph-size 1) msdos-fiddle))
#+macintosh(setf *text-window-size*
        (list 490 (max 112 (min 280 (- (second screen-size) 326))))) 
#+macintosh(setf *text-window-location* (list 10 (min 322 (- row-pixels 138)))) 
#-macintosh(setf *text-window-location* (list 10 30))
#-macintosh(setf *text-window-size* (list 490 280))
  )

(spreadplot-sizes screen-size)

(provide "sprdsize")